#pragma once
#include "VC_Drawable.h"
#include "C_Widget.h"
#include "C_Label.h"
#include "C_TextButton.h"

class C_GUI_ShipEditor :
	public VC_Drawable
{
private:
	gui::C_Widget m_widget;
	gui::C_Widget m_wgBottom;
	gui::C_Label  m_lbSettings;

	//////////////////////////////////////////////////////////
	////// ADD | DELETE BIT
	gui::C_Widget		m_wgAddDeleteBit;
	gui::C_TextButton	m_pbAddBit;
	gui::C_TextButton	m_pbDeleteBit;

	//////////////////////////////////////////////////////////
	////// PROPERTIES

	gui::C_Widget	m_wgWall;
	gui::C_Widget	m_wgWallFusionLbl;
	gui::C_Label	m_lbWallFusionTopic;
	gui::C_Label	m_lbWallFusionResult;

	gui::C_Widget		m_wgWallSizeLbl;
	gui::C_Label		m_lbWallSizeTopic;
	gui::C_Label		m_lbWallSizeResult;
	gui::C_Widget		m_wgWallSizeCmd;
	gui::C_TextButton	m_tbWallSizeMore;
	gui::C_TextButton	m_tbWallSizeLess;

	/////////////////////////////////////////////
	///////	BIND
	/////////////////////////////////////////////
	gui::C_Widget	m_wgBind;
	gui::C_Widget	m_wgBindFusionLbl;
	gui::C_Label	m_lbBindFusionTopic;
	gui::C_Label	m_lbBindFusionResult;

	gui::C_Widget		m_wgBindAmtLbl;
	gui::C_Label		m_lbBindAmtTopic;
	gui::C_Label		m_lbBindAmtResult;
	gui::C_Widget		m_wgBindAmtCmd;
	gui::C_TextButton	m_tbBindAmtMore;
	gui::C_TextButton	m_tbBindAmtLess;

	/////////////////////////////////////////////
	///////	SKIN AND WIRING
	/////////////////////////////////////////////
	gui::C_Widget		m_wgSkinWiring;

	gui::C_Widget		m_wgSkinLbl;
	gui::C_Label		m_lbSkinTopic;
	gui::C_Label		m_lbSkinResult;

	gui::C_Widget		m_wgWiringLbl;
	gui::C_Label		m_lbWiringTopic;
	gui::C_Label		m_lbWiringResult;

	gui::C_Widget		m_wgAreaLbl;
	gui::C_Label		m_lbAreaTopic;
	gui::C_Label		m_lbAreaResult;

public:
	C_GUI_ShipEditor();
	virtual ~C_GUI_ShipEditor();

	void addAddBitFunc(std::function<void()> f) { m_pbAddBit.setCommand(f); }
	void addDeleteBitFunc(std::function<void()> f) { m_pbDeleteBit.setCommand(f); }
	void addMoreWallSizeFunc(std::function<void()> f) { m_tbWallSizeMore.setCommand(f); }
	void addLessWallSizeFunc(std::function<void()> f) { m_tbWallSizeLess.setCommand(f); }
	void addMoreBindAmtFunc(std::function<void()> f) { m_tbBindAmtMore.setCommand(f); }
	void addLessBindAmtFunc(std::function<void()> f) { m_tbBindAmtLess.setCommand(f); }

	virtual void handleEvent(sf::Event e);
	virtual void render();
	virtual void update();

	/////////////////////////////////////////////////////////////////////////////
	///////////	SETTING FUNCTIONS
	void setTextWallFusion(std::wstring t)	{ m_lbWallFusionResult.setText(t);	}
	void setTextWallSize(std::wstring t)	{ m_lbWallSizeResult.setText(t);	}
	void setTextBindFusion(std::wstring t)	{ m_lbBindFusionResult.setText(t);	}
	void setTextBindAmt(std::wstring t) 	{ m_lbBindAmtResult.setText(t);		}
	void setTextSkin(std::wstring t) 		{ m_lbSkinResult.setText(t);		}
	void setTextWiring(std::wstring t) 		{ m_lbWiringResult.setText(t);		}
	void setTextArea(std::wstring t) 		{ m_lbAreaResult.setText(t);		}
};

